Repository navigation
Follow the gettsim Grundrente income input and the bezieht_altersrente rename - #107
Conversation
…e rename Map the new sozialversicherung__rente__grundrente__einkommen_vorjahr_m in place of the five removed gross-receipt inputs, rename bezieht_rente to bezieht_altersrente, and regenerate the input scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hmgaudecker
left a comment
There was a problem hiding this comment.
Verdict
Approve, subject to three small fixes.
To fix before merge
-
Follow the name and the year that gettsim #1246 ends up with. My review there asks to rename the input to
einkommen_vorvorjahr_m_ehe, because § 97a Abs. 2 S. 2 SGB VI takes the income of the "vorvergangenes Kalenderjahr". If that goes in, three places here change: the key inBASE_MAPPING(mapping.py:116), theGAP_NOTESentry (mapping.py:288), and the regeneratedgettsim_input_scope.json. The gap note also says to compute the income "in a run for the previous year"; that must then read "for the year before the previous year". -
The PR description says
bezieht_altersrente"is now in scope from 2021". In the regeneratedgettsim_input_scope.jsonit is in scope in all 13 periods, from 1984-01-01. gettsim defines it as an input without a start date, so the JSON is right and the sentence is not. -
The gap note for
bezieht_altersrentestill reads "Derive bool from a pension-receipt variable" (mapping.py:240). After the rename the input means old-age pension only, so receipt of an Erwerbsminderungsrente or a survivor's pension must not set it. Please say so in the note.
Comments
income_from_interest_dividends_y_hhandincome_from_rental_leasing_y_hhare no longer mapped to any GETTSIM input. They are still cleaned (clean_modules/pequiv.py:107-108) and carry metadata. Fine to keep; I only note that they are now unused on the GETTSIM side.- No test covers the new gap note.
tests/gettsim_inputs/test_mapping.pyasserts this for other entries (jahr_renteneintritt,kindergeld__betrag_m); one line for the Grundrente income would match.
What I checked
n_base_qnamesfalls from 110 to 106: five Grundrente inputs out, one in, and one rename.- The new Grundrente income input is in scope in 4 of 13 periods, from 2021-01-01, which matches the start date of the input in gettsim.
§ 97a Abs. 2 S. 2 SGB VI uses the income of the vorvergangenes Kalenderjahr.
Documentation build overview
|
The Grundrente income test summed gross receipts. § 97a Abs. 2 S. 1 SGB VI counts the zu versteuerndes Einkommen, plus the steuerfreier Teil of pensions, plus Abgeltungsteuer capital income. Taking gross receipts overstated the income by roughly the Vorsorgeaufwendungen, about 140 €/month less Zuschlag for a single pensioner with a 1,800 € pension. **Approach.** The law uses the income of the vorvergangenes Kalenderjahr (§ 97a Abs. 2 S. 2 SGB VI; the year before that if no tax assessment exists, S. 3), so it can't be computed in the same run. It is now one input at the couple level, `grundrente__einkommen_vorvorjahr_m_ehe`. A run for that earlier year produces it through the per-person target `grundrente__einkommen_für_einkommensanrechnung_im_übernächsten_jahr_y`, summed over the spouses (`…_m_ehe`). This is the same two-run pattern as Elterngeld, and a new how-to notebook shows it. **Also fixed:** - Thresholds are rounded up to full Euro and stay fixed for the calendar year, using the Rentenwert of the previous 1 July (§ 97a Abs. 4 S. 1, 5). - The Zuschlag is tax-free (§ 3 Nr. 14a EStG). From 2021, anyone who supplies `einnahmen__renten__gesetzliche_m` as data also needs `grundrente__betrag_m` and `bezieht_altersrente`. - The 39.32 € Rentenwert had the date key `2024-01-07`; it is now `2024-07-01` (reported in #1202, still wrong on `main`). **Worth a look:** - Not modelled: the t − 3 fallback of § 97a Abs. 2 S. 3 SGB VI (the user passes the income of the right year), the fallback without tax data (Abs. 2 S. 4), Versorgungsbezüge (#1247), the 1/10 rule for capital income (#1248), and the fixed euro amount of the steuerfreier Teil of pensions (GETTSIM approximates it via the Besteuerungsanteil). - A negative zvE (only possible when supplied as data) offsets the other components. Neither the statute nor the GRA addresses negative amounts. Closes #919. Follow-ups: ttsim-dev/gettsim-personas#63, ttsim-dev/soep-preparation#107. **Merge order.** ttsim-dev/gettsim-personas#63 needs this PR (its new persona inputs are unnecessary on gettsim `main`) and this PR's docs need it, so: merge it while it is pinned to this branch, re-pin gettsim-personas here to `main` and relock, merge this PR, then point gettsim-personas back at gettsim `main`. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Companion to ttsim-dev/gettsim#1246, which replaces the five gross-receipt Grundrente inputs with
grundrente__einkommen_vorvorjahr_m_ehe. That input is the couple's § 97a SGB VI income: zvE + steuerfreier Teil of pensions + Abgeltungsteuer capital income of the vorvergangenes Kalenderjahr (§ 97a Abs. 2 S. 2 SGB VI).None. SOEP has no zvE, and a gap note points to the GETTSIM targetgrundrente__einkommen_für_einkommensanrechnung_im_übernächsten_jahr_m_ehethat produces it in a run for the year before the previous one. As a result,income_from_interest_dividends_y_hhandincome_from_rental_leasing_y_hhno longer feed the Grundrente. Their cleaning code is unchanged.bezieht_rente→bezieht_altersrente: gettsim renamed this input in #1233 and the mapping still used the old name, so the input was in scope in no period. It is now in scope in all periods, since gettsim defines it without a start date. Its gap note now says that receipt of an Erwerbsminderungsrente or a survivor's pension must not set it.gettsim_input_scope.json: regenerated against the #1246 branch. The scope test skips in this repo's CI, since gettsim is not a dependency here. It passes in the dev-gettsim workspace.